Open
Conversation
Signed-off-by: Olaf Klischat <olaf.klischat@gmail.com>
be095b1 to
7ba1353
Compare
|
|
||
| // If we got this far, it was an interrupt, so don't exit cleanly | ||
| os.Exit(2) | ||
| os.Exit(0) |
There was a problem hiding this comment.
why are we changing the exit code from 2 to 0? wouldn't 2 be more appropriate in case you receive events corresponding to os.Interrupt, syscall.SIGTERM ?
The other change does make sense to me. We also don't have any <-serverCh in main.go that would wait for close(serverCh)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Correct me if I'm overlooking something, but the serverCh serves no function (anymore?), and
server.Shutdown()returns normally if the shutdown worked, so we get to the end of main() and want to exit 0, not 2. I could definitely reproduce that the current upstream version always exits 2 when terminated with SIGTERM/SIGINT, which is at the very least an annoyance.